var status = -1;
var selectionLog = [];

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.gainSkillBuff(80001592);
            cm.spawnMobLimit(8240090, 1, -3089, 777, 100);
            cm.spawnMobLimit(8240089, 1, -3843, 777, 100);
            cm.spawnMobLimit(8240089, 1, -3190, 777, 100);
            cm.spawnMobLimit(8240089, 1, -2974, 777, 100);
            cm.spawnMobLimit(8240088, 1, -3314, 777, 100);
            cm.spawnMobLimit(8240088, 1, -3764, 777, 100);
            cm.spawnMobLimit(8240087, 1, -3635, 777, 100);
            cm.spawnMobLimit(8240087, 1, -2976, 777, 100);
            cm.spawnMobLimit(8240086, 1, -3246, 777, 100);
            cm.spawnMobLimit(8240086, 1, -3854, 777, 100);
            cm.spawnMobLimit(8240096, 1, -3501, 777, 100);
            cm.npc_ChangeController(1540671, "oid=48114", -4401, 777, 85, -4451, -4351, 0, false, 0, false);
            cm.npc_ChangeController(1540671, "oid=48115", -4291, 777, 81, -4341, -4241, 0, false, 0, false);
            cm.npc_ChangeController(1540710, "oid=48116", 3017, 777, 24, 2967, 3067, 1, false, 0, false);
            cm.npc_ChangeController(1540671, "oid=48117", -4511, 777, 86, -4561, -4461, 0, false, 0, false);
            cm.npc_ChangeController(1540671, "oid=48118", -4621, 777, 87, -4671, -4571, 0, false, 0, false);
            cm.setPartner(1, 1540741, 80001601, 0);
            cm.setPartner(1, 1540736, 80001602, 0);
            cm.setPartner(1, 1540737, 80001635, 0);
            cm.openUI(254);
            cm.npc_SetSpecialAction("oid=48116", "open2", -1, 1);
            cm.spawnMobLimit(8240090, 1, -3854, 777, 100);
            cm.spawnMobLimit(8240089, 1, -3854, 777, 100);
            cm.spawnMobLimit(8240089, 1, -3854, 777, 100);
            cm.spawnMobLimit(8240089, 1, -3854, 777, 100);
            cm.spawnMobLimit(8240088, 1, -3625, 777, 100);
            cm.spawnMobLimit(8240088, 1, -3625, 777, 100);
            cm.spawnMobLimit(8240088, 1, -3625, 777, 100);
            cm.spawnMobLimit(8240090, 1, -1977, 777, 100);
            cm.spawnMobLimit(8240090, 1, -2603, 777, 100);
            cm.spawnMobLimit(8240089, 1, -2467, 777, 100);
            cm.spawnMobLimit(8240089, 1, -2202, 777, 100);
            cm.spawnMobLimit(8240089, 1, -2192, 777, 100);
            cm.spawnMobLimit(8240088, 1, -2096, 777, 100);
            cm.spawnMobLimit(8240088, 1, -2483, 777, 100);
            cm.spawnMobLimit(8240088, 1, -2826, 777, 100);
            cm.spawnMobLimit(8240086, 1, -1881, 777, 100);
            cm.spawnMobLimit(8240086, 1, -2671, 777, 100);
            cm.spawnMobLimit(8240096, 1, -2420, 777, 100);
            cm.spawnMobLimit(8240096, 1, -2141, 777, 100);
            cm.spawnMobLimit(8240090, 1, -3246, 777, 100);
            cm.spawnMobLimit(8240089, 1, -3246, 777, 100);
            cm.spawnMobLimit(8240089, 1, -3246, 777, 100);
            cm.spawnMobLimit(8240089, 1, -3246, 777, 100);
            cm.spawnMobLimit(8240088, 1, -2944, 777, 100);
            cm.spawnMobLimit(8240088, 1, -2944, 777, 100);
            cm.spawnMobLimit(8240088, 1, -2944, 777, 100);
            cm.spawnMobLimit(8240090, 1, -2559, 777, 100);
            cm.spawnMobLimit(8240089, 1, -2559, 777, 100);
            cm.spawnMobLimit(8240089, 1, -2559, 777, 100);
            cm.spawnMobLimit(8240089, 1, -2559, 777, 100);
            cm.spawnMobLimit(8240090, 1, -849, 777, 100);
            cm.spawnMobLimit(8240090, 1, -766, 777, 100);
            cm.spawnMobLimit(8240090, 1, -1604, 777, 100);
            cm.spawnMobLimit(8240089, 1, -1425, 777, 100);
            cm.spawnMobLimit(8240089, 1, -1713, 777, 100);
            cm.spawnMobLimit(8240089, 1, -1361, 777, 100);
            cm.spawnMobLimit(8240088, 1, -1291, 777, 100);
            cm.spawnMobLimit(8240088, 1, -1691, 777, 100);
            cm.spawnMobLimit(8240087, 1, -1599, 777, 100);
            cm.spawnMobLimit(8240087, 1, -923, 777, 100);
            cm.spawnMobLimit(8240086, 1, -1241, 777, 100);
            cm.spawnMobLimit(8240088, 1, -1056, 777, 100);
            cm.spawnMobLimit(8240090, 1, -1881, 777, 100);
            cm.spawnMobLimit(8240089, 1, -1881, 777, 100);
            cm.spawnMobLimit(8240089, 1, -1881, 777, 100);
            cm.spawnMobLimit(8240089, 1, -1881, 777, 100);
            cm.spawnMobLimit(8240088, 1, -1616, 777, 100);
            cm.spawnMobLimit(8240088, 1, -1616, 777, 100);
            cm.spawnMobLimit(8240088, 1, -1616, 777, 100);
            cm.spawnMobLimit(8240090, 1, -581, 777, 100);
            cm.spawnMobLimit(8240090, 1, -690, 777, 100);
            cm.spawnMobLimit(8240090, 1, -605, 777, 100);
            cm.spawnMobLimit(8240089, 1, -340, 777, 100);
            cm.spawnMobLimit(8240089, 1, -92, 777, 100);
            cm.spawnMobLimit(8240089, 1, -217, 777, 100);
            cm.spawnMobLimit(8240088, 1, 326, 777, 100);
            cm.spawnMobLimit(8240087, 1, -74, 777, 100);
            cm.spawnMobLimit(8240086, 1, -417, 777, 100);
            cm.spawnMobLimit(8240096, 1, -648, 777, 100);
            cm.spawnMobLimit(8240088, 1, -115, 777, 100);
            cm.spawnMobLimit(8240090, 1, -1241, 777, 100);
            cm.spawnMobLimit(8240089, 1, -1241, 777, 100);
            cm.spawnMobLimit(8240089, 1, -1241, 777, 100);
            cm.spawnMobLimit(8240089, 1, -1241, 777, 100);
            cm.spawnMobLimit(8240088, 1, -870, 777, 100);
            cm.spawnMobLimit(8240088, 1, -870, 777, 100);
            cm.spawnMobLimit(8240088, 1, -870, 777, 100);
            cm.spawnMobLimit(8240090, 1, 1039, 777, 100);
            cm.spawnMobLimit(8240090, 1, 650, 777, 100);
            cm.spawnMobLimit(8240090, 1, 372, 777, 100);
            cm.spawnMobLimit(8240089, 1, 147, 777, 100);
            cm.spawnMobLimit(8240089, 1, 1255, 777, 100);
            cm.spawnMobLimit(8240088, 1, 1167, 777, 100);
            cm.spawnMobLimit(8240088, 1, 684, 777, 100);
            cm.spawnMobLimit(8240087, 1, 546, 777, 100);
            cm.spawnMobLimit(8240086, 1, 1035, 777, 100);
            cm.spawnMobLimit(8240086, 1, 183, 777, 100);
            cm.spawnMobLimit(8240096, 1, 805, 777, 100);
            cm.spawnMobLimit(8240088, 1, 840, 777, 100);
            cm.spawnMobLimit(8240087, 1, 1082, 777, 100);
            cm.spawnMobLimit(8240090, 1, -417, 777, 100);
            cm.spawnMobLimit(8240089, 1, -417, 777, 100);
            cm.spawnMobLimit(8240089, 1, -417, 777, 100);
            cm.spawnMobLimit(8240089, 1, -417, 777, 100);
            cm.spawnMobLimit(8240088, 1, 147, 777, 100);
            cm.spawnMobLimit(8240088, 1, 147, 777, 100);
            cm.spawnMobLimit(8240088, 1, 147, 777, 100);
            cm.spawnMobLimit(8240090, 1, 183, 777, 100);
            cm.spawnMobLimit(8240089, 1, 183, 777, 100);
            cm.spawnMobLimit(8240089, 1, 183, 777, 100);
            cm.spawnMobLimit(8240089, 1, 183, 777, 100);
            cm.spawnMobLimit(8240089, 1, 1807, 777, 100);
            cm.spawnMobLimit(8240090, 1, 2084, 777, 100);
            cm.spawnMobLimit(8240090, 1, 1385, 777, 100);
            cm.spawnMobLimit(8240090, 1, 1050, 777, 100);
            cm.spawnMobLimit(8240089, 1, 1444, 777, 100);
            cm.spawnMobLimit(8240089, 1, 1475, 777, 100);
            cm.spawnMobLimit(8240089, 1, 2033, 777, 100);
            cm.spawnMobLimit(8240089, 1, 1498, 777, 100);
            cm.spawnMobLimit(8240088, 1, 2052, 777, 100);
            cm.spawnMobLimit(8240088, 1, 1872, 777, 100);
            cm.spawnMobLimit(8240086, 1, 1781, 777, 100);
            cm.spawnMobLimit(8240090, 1, 1743, 777, 100);
            cm.spawnMobLimit(8240088, 1, 1036, 777, 100);
            cm.spawnMobLimit(8240088, 1, 635, 777, 100);
            cm.spawnMobLimit(8240088, 1, 635, 777, 100);
            cm.spawnMobLimit(8240088, 1, 635, 777, 100);
            cm.spawnMobLimit(8240088, 1, 1125, 777, 100);
            cm.spawnMobLimit(8240088, 1, 1125, 777, 100);
            cm.spawnMobLimit(8240088, 1, 1125, 777, 100);
            cm.spawnMobLimit(8240090, 1, 1147, 777, 100);
            cm.spawnMobLimit(8240089, 1, 1147, 777, 100);
            cm.spawnMobLimit(8240089, 1, 1147, 777, 100);
            cm.spawnMobLimit(8240089, 1, 1147, 777, 100);
            cm.spawnMobLimit(8240090, 1, 2544, 777, 100);
            cm.spawnMobLimit(8240089, 1, 2476, 777, 100);
            cm.spawnMobLimit(8240087, 1, 2655, 777, 100);
            cm.spawnMobLimit(8240086, 1, 2284, 777, 100);
            cm.spawnMobLimit(8240096, 1, 2717, 777, 100);
            cm.spawnMobLimit(8240096, 1, 2401, 777, 100);
            cm.spawnMobLimit(8240090, 1, 1891, 777, 100);
            cm.spawnMobLimit(8240089, 1, 1891, 777, 100);
            cm.spawnMobLimit(8240089, 1, 1891, 777, 100);
            cm.spawnMobLimit(8240089, 1, 1891, 777, 100);
            cm.spawnMobLimit(8240090, 1, 2359, 777, 100);
            cm.spawnMobLimit(8240089, 1, 2359, 777, 100);
            cm.spawnMobLimit(8240089, 1, 2359, 777, 100);
            cm.spawnMobLimit(8240089, 1, 2359, 777, 100);
            cm.spawnMobLimit(8240088, 1, 2698, 777, 100);
            cm.spawnMobLimit(8240088, 1, 2698, 777, 100);
            cm.spawnMobLimit(8240088, 1, 2698, 777, 100);
            cm.dispose()
        }
    }
}

function start() {
    status = -1;
    action(1, 0, 0)
};